package com.pope.framework.triage.modular.mapper;

import com.pope.framework.statistics.modular.dto.TriageInfoListDto;
import com.pope.framework.statistics.modular.vo.DepartNumberVo;
import com.pope.framework.statistics.modular.vo.GradeNumberVo;
import com.pope.framework.statistics.modular.vo.TriageInfoListVo;
import com.pope.framework.triage.modular.entity.TriageInfo;
import com.pope.framework.triage.modular.vo.TriageSimpleInfoVo;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 * 分诊信息 Mapper 接口
 * </p>
 *
 * @author superpope
 * @since 2019-01-14
 */
public interface TriageInfoMapper extends BaseMapper<TriageInfo> {

	 IPage<TriageSimpleInfoVo> selectSimpleList(Page<TriageSimpleInfoVo> page, @Param("id")Integer id,@Param("name") String name,@Param("beginDate") String beginDate,
			 @Param("endDate") String endDate,@Param("emergencyNumber") String emergencyNumber,@Param("triageState") String triageState,@Param("hospitalId")Integer hospitalId);
	 
	 
	 Integer selectPatientsNumber(@Param("beginDate") String beginDate,@Param("endDate") String endDate,@Param("hospitalId")Integer hospitalId,@Param("whereAbouts") String whereAbouts,@Param("triageState") String triageState);
	 
	 /**
	  * 统计科室当前人数
	  * @param beginDate
	  * @param endDate
	  * @param hospitalId
	  * @return
	  */
	 List<DepartNumberVo> selectPatientsNumberByDepart(@Param("beginDate") String beginDate,@Param("endDate") String endDate,@Param("hospitalId")Integer hospitalId,@Param("triageState") String triageState);
	 
	 /**
	  * 统计分级当前人数
	  * @param beginDate
	  * @param endDate
	  * @param hospitalId
	  * @return
	  */
	 List<GradeNumberVo> selectPatientsNumberByGrade(@Param("beginDate") String beginDate,@Param("endDate") String endDate,@Param("hospitalId")Integer hospitalId,@Param("triageState") String triageState);
	 
	 
	 /**
	  * 查询分诊明细列表
	  * @param triageInfoListDto
	  * @return
	  */
	 IPage<TriageInfoListVo>  selectTriageStaticsDetail(Page<TriageInfoListVo> page,@Param("triageInfoListDto")TriageInfoListDto triageInfoListDto);
	 
	 /**
	  * 分级变更率统计
	  */
	 Map<String,Object> selectPerChangeGrage(@Param("beginDate") String beginDate,@Param("endDate") String endDate,@Param("hospitalId")Integer hospitalId ,@Param("triageState") String triageState);
}
